﻿#include "LinkStack.h"

int main(){
	STACK s;
PSTACK S = &s;
init_LinkStack(S);

push(S, 1);
push(S, 2);

push(S, 5);
push(S, 4);

traverse_LinkStack(S);
int val;
pop(S, &val);
traverse_LinkStack(S);

cout << "栈顶元素为：" << get_top_value(S) << endl;

clear_LinkStack(S);
destory_LinkStack(S);
traverse_LinkStack(S);

return 0;
}